﻿namespace OasisCiq.Xpil
{
    using System.Collections.Generic;
    using System.Collections.Specialized;
    using CommonTypes;
    using External;
    using Xnl;
    using XS;

    /// <summary>
    /// Account details such as bank account, customer account with utilities
    /// </summary>
    public class Account : IValidityDateGroup, IDataQualityGroup, IExtendedAttributes
    {
        /// <summary>
        /// Type of account. e.g. bank, customer, employee, etc
        /// </summary>
        public virtual AccountTypeList Type { get; set; }

        /// <summary>
        /// Joint, Individual, corporate, etc.
        /// </summary>
        public virtual AccountOwnershipTypeList OwnershipType { get; set; }

        /// <summary>
        /// Status of the entity. e.g. Old, Current, Inactive, Active, etc
        /// </summary>
        public virtual StatusList Status { get; set; }

        /// <summary>
        /// Could be start date, issue date, validity start date, etc
        /// </summary>
        public virtual XSDateTime DateValidFrom { get; set; }

        /// <summary>
        /// Could be end date, expiry date, validity end date, etc
        /// </summary>
        public virtual XSDateTime DateValidTo { get; set; }

        /// <summary>
        /// This attribute indicates what level of trust can be given to the parent element.
        /// Omit this attribute if the data quality is unknown. If the data quality is known,
        /// the value is "Valid, else "InValid"
        /// </summary>
        public virtual DataQualityTypeList DataQualityType { get; set; }

        /// <summary>
        /// Date the data quality is valid from
        /// </summary>
        public virtual XSDateTime ValidFrom { get; set; }

        /// <summary>
        /// Date the data quality is valid to
        /// </summary>
        public virtual XSDateTime ValidTo { get; set; }

        public virtual NameValueCollection ExtendedAttributes { get; set; }

        /// <summary>
        /// Information about the account
        /// </summary>
        public virtual ICollection<AccountElement> AccountElements { get; set; }

        /// <summary>
        /// Reference to a Party element that describes the organisation where the account is held.
        /// </summary>
        public virtual OrganisationNameType Organization { get; set; }
    }
}